package ihm;

import java.awt.CardLayout;
import java.awt.FlowLayout;

public class MetricsPanel extends javax.swing.JPanel{
	private MainFrame frame;
    
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    
    
	public MetricsPanel(MainFrame f) {
		super(new FlowLayout());
		frame=f;
		 initComponents();
	}

	 private void initComponents() {
	        jButton1 = new javax.swing.JButton();
	        jButton2 = new javax.swing.JButton();
	        jButton3 = new javax.swing.JButton();
	        jButton6 = new javax.swing.JButton();
	        jButton5 = new javax.swing.JButton();

	        jButton1.setText("WP complexity");
	        jButton1.addActionListener(new java.awt.event.ActionListener() {
	            public void actionPerformed(java.awt.event.ActionEvent evt) {
	                jButton1ActionPerformed(evt);
	            }
	        });

	        jButton2.setText("Creative Effort");

	        jButton3.setText("Method Attitude");

	        jButton6.setIcon(new javax.swing.ImageIcon("C:\\Users\\Noelie\\Pictures\\back.gif")); // NOI18N
	        jButton6.addActionListener(new java.awt.event.ActionListener() {
	            public void actionPerformed(java.awt.event.ActionEvent evt) {
	                jButton6ActionPerformed(evt);
	            }
	        });

	        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(this);
	        this.setLayout(jPanel1Layout);
	        jPanel1Layout.setHorizontalGroup(
	            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(jPanel1Layout.createSequentialGroup()
	                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	                    .addGroup(jPanel1Layout.createSequentialGroup()
	                        .addGap(45, 45, 45)
	                        .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE))
	                    .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
	                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
	                        .addGap(45, 45, 45)
	                        .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE))
	                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
	                        .addGap(45, 45, 45)
	                        .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 256, Short.MAX_VALUE)))
	                .addContainerGap())
	        );
	        jPanel1Layout.setVerticalGroup(
	            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
	            .addGroup(jPanel1Layout.createSequentialGroup()
	                .addGap(46, 46, 46)
	                .addComponent(jButton1)
	                .addGap(18, 18, 18)
	                .addComponent(jButton2)
	                .addGap(18, 18, 18)
	                .addComponent(jButton3)
	                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 61, Short.MAX_VALUE)
	                .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)
	                .addContainerGap())
	        );

	        jButton5.setIcon(new javax.swing.ImageIcon("C:\\Users\\Noelie\\Pictures\\valider2.png")); // NOI18N
	        jButton5.addActionListener(new java.awt.event.ActionListener() {
	            public void actionPerformed(java.awt.event.ActionEvent evt) {
	                jButton5ActionPerformed(evt);
	            }
	        });

	    }

	    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                         
	        // TODO add your handling code here:
	    }                                        

	    private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {                                         
	        // TODO add your handling code here:
	    }                                        

	    private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {                                         
	    	frame.setTitleToFragmentPanel();
	    	CardLayout cl = (CardLayout)(frame.getPan().getLayout());	
			cl.show(frame.getPan(), "fragmentPanel");
	    	//cl.last(frame.getPan());
	    }                                        

	   



}
